package com.gc.frontend.service.impl;

import com.gc.common.dto.AlertDTO;
import com.gc.common.entity.Alert;
import com.gc.common.mapper.AlertAttentionMapper;
import com.gc.common.mapper.AlertMapper;
import com.gc.frontend.service.AlertService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by 瑱彬 on 2015/4/23.
 */
@Service
public class AlertServiceImpl implements AlertService {

    @Autowired
    private AlertMapper alertMapper;

    @Autowired
    private AlertAttentionMapper alertAttentionMapper;


    @Override
    public int deleteByPrimaryKey(Integer id) {
        return this.alertMapper.deleteByPrimaryKey(id);
    }

    @Override
    public int insert(Alert record) {
        return this.alertMapper.insert(record);
    }

    @Override
    public int insertSelective(Alert record) {
        return this.alertMapper.insertSelective(record);
    }

    @Override
    public Alert selectByPrimaryKey(Integer id) {
        return this.alertMapper.selectByPrimaryKey(id);
    }

    @Override
    public int updateByPrimaryKeySelective(Alert record) {
        return this.alertMapper.updateByPrimaryKeySelective(record);
    }

    @Override
    public int updateByPrimaryKey(Alert record) {
        return this.alertMapper.updateByPrimaryKey(record);
    }

    @Override
    public List<Alert> selectByDTO(AlertDTO dto) {
        return this.alertMapper.selectByDTO(dto);
    }

    @Override
    public int deleteInIds(String ids) {
        return this.alertMapper.deleteInIds(ids);
    }


    @Override
    public List<Alert> getAlertsByImei(String carImei) {
        return this.alertMapper.selectByImei(carImei);
    }
}
